<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title></title>
	<base href="<%=basePath%>">
	<link href="background/css/main.css" rel="stylesheet" type="text/css" />
	<script src="background/js/calendar3.js" type="text/javascript"></script>
	<script charset="utf-8" src="editor/kindeditor-min.js"></script> 
	<script charset="utf-8" src="editor/lang/zh_CN.js"></script>
	<script>
        var editor;
			KindEditor.ready(function(K) {
				editor = K.create('textarea[id="content1"]', {
					resizeType : 1,
					allowPreviewEmoticons : false,
					allowImageUpload : false,
					items : [
						'source', '|', 'fullscreen', '|', 'plainpaste','|', 'fontname', 'fontsize', 'forecolor', 'bold', 'italic', 'underline',
						'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
						'insertunorderedlist', '|', 'link']
				});
			});
	</script>
</head>

<body>
<s:form action="saveTrender.action" method="post" enctype="multipart/form-data">
	<tr>
		<td colspan="2" class="header"><s:text name="editheader" /></td>
	</tr>
	<s:textfield id="title" name="trender.ttitle" key="title" required="true" />
	<s:textfield id="createtime" name="trender.tcreateTime"
		onclick="new Calendar().show(this);" readonly="true" key="createTime" required="true" />
	<s:file name="file" key="image" />
	<tr>
		<td></td>
		<td>
			<s:property value="trender.tpicture"/>
			<span style="font-size:12px;color:red">
        	图片最大限制为500k，允许上传图片的类型为：bmp、png、gif、jpeg、jpg
        	</span>
		</td>
	</tr>
	<s:textarea name="trender.tcontent" id="content1" key="content" required="true"></s:textarea>
	<tr>
    	<td colspan="2" class="button">
    		<s:reset key="editreset" theme="simple" onclick="javascript:history.go(-1);" />
    		<s:submit key="submit" theme="simple" />
    	</td>
	</tr>
	<s:hidden name="trender.tpicture" />
	<s:hidden name="trender.tno" />
</s:form>
</form>
</body>
</html>